<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><{$site_title}>管理中心</title>
<{include file="js.html"}>
<{include file="kindeditor.html"}>
<link type="text/css" rel="stylesheet" href="css/validator.css"></link>
<script src="js/formValidator.js" type="text/javascript"></script>
<script src="js/formValidatorRegex.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
    //权限=>多选
    $(".role").click(function() {  
      var r_id = "";  
      $("input[name=label]").each(function() {  
          if ($(this).is(":checked")) {  
              r_id += $(this).val()+",";
          }  
      });  
      $('input:[name=label_id]').val(r_id);
  });  


  $("#myForm").submit(function(){
    return queding('是否保存设置？',".subCheck");
  })

})
</script>
</head>

<body>
<div class="box">
<div style="background:url(images/mainbj.jpg) repeat-x; line-height:31px; height:31px;">
<table width="262" height="31" border="0" cellpadding="0" cellspacing="0">
<tr><td width="41" align="center">
<img src="images/biao1.jpg" /></td>
<td width="221"><strong>当前位置</strong>：资讯 &gt; 添加咨询</td>
</tr></table>
</div>
<{if $row.id>0}>
<table class="lefttab" cellpadding="0" cellspacing="0">
<tbody>
<tr><td height="50px" class="xiugai">
<a style="float:left; margin-left:5px;" href="info_add.php?id=<{$smarty.get.id}>"><div class="inp2 inp">基本信息</div></a>
<a style="float:left; margin-left:5px;" href="info_topic.php?id=<{$smarty.get.id}>"><div class="inp2">小编说</div></a>
<a style="float:left; margin-left:5px;" href="info_comment.php?id=<{$smarty.get.id}>"><div class="inp2">用户评论</div></a>
  </tr>
</tbody></table>
<{/if}>
<form action="" method="post" name="myForm" id="myForm" enctype='multipart/form-data'>
<table class="lefttab" cellpadding="0" cellspacing="0">
<tr><td colspan="3"><div style="height:26px; text-align:left; line-height:26px; background:url(images/xbj1.jpg) repeat-x; border:1px solid #e9f5fa;font-weight:bold;">&nbsp;&nbsp;添加咨询</div>
</td></tr>
<tr>
  <td width="100" align="right"><font color="#e47c02">*</font> <strong>资讯标题</strong>：</td>
  <td width="310" align="left">&nbsp;<input type="text" name="title"  size="20" class="subCheck" value="<{$row.title}>" /></td>
</tr>
<tr>
  <td align="right"><font color="#e47c02">*</font> <strong>资讯内容</strong>：</td>
  <td align="left" style="padding:5px 0; line-height:25px; color:#666666;">
  <textarea class="editor" name="intro" style="width:700px;height:200px;visibility:hidden;"><{$row.intro}></textarea>
  </td>
</tr>
<tr>
  <td align="right"><font color="#e47c02">*</font> <strong>资讯图</strong>：</td>
  <td width="673" align="left">&nbsp;<input type="file" name="thumbnail" /></td>
</tr>
<{if $row.thumbnail!=""}>
<tr>
  <td align="right"><font color="#e47c02">*</font> <strong>原资讯图</strong>：</td>
  <td width="673" align="left">&nbsp;<a target="_blank" href="../upload/info/large/<{$row.thumbnail}>"><img src="../upload/info/small/<{$row.thumbnail}>"/></a></td>
</tr>
<{/if}>

<tr>
  <td align="right"><font color="#e47c02">*</font> <strong>分类</strong>：</td>
  <td align="left">&nbsp;
  <select  name="class_id"  class="subCheck">
	<option value="">请选择分类</option>
	<{foreach item=loop from=$info_class}>
	  <option value="<{$loop.id}>" <{if $row.class_id==$loop.id}>selected<{/if}>><{$loop.class_name}></option>
	<{/foreach}>
  </select>
  </td>
</tr>

<tr>
  <td align="right"><font color="#e47c02">*</font> <strong>标签</strong>：</td>
  <td width="873" align="left">
  <{foreach item=loop from=$label}>
      <input type="checkbox" class="role" value="<{$loop.id}>" name="label" <{foreach item=label from=$row.label_id}> <{if $label==$loop.id}>checked="checked"<{/if}> <{/foreach}> /><{$loop.label_name}>&nbsp;&nbsp;
  <{/foreach}>
  </td>
</tr>
 <input type="hidden" name="label_id" value="<{$label_id}>"/>

<{if $row.type=='user'}>
<tr>
  <td align="right"><font color="#e47c02">*</font> <strong>审核</strong>：</td>
  <td width="673" align="left">&nbsp;<input type="radio" name="check" value="pass" <{if $row.check=='pass'}>checked<{/if}>/>通过 <input type="radio" name="check" value="refuse" <{if $row.check=='refuse'}>checked<{/if}>/>拒绝 </td>
</tr>
<{/if}>

<!-- <{if $row.id>0}>
<tr>
  <td align="right"><font color="#e47c02">*</font> <strong>小编说</strong>：</td>
  <td width="673" align="left">
    <ul>
      <{foreach item=res from=$topics}>
      <li>小编-<{$res.admin_id}>：<{$res.topic}></li>
      <{/foreach}>
    </ul>
    &nbsp;<input type="text" name="check" value="refuse"/> <input type="button" name="submit" value="添加" />
  </td>
</tr>
<{/if}> -->

<tr><td height="50px" colspan="2">
	<p>&nbsp;</p>
    <p align="left" style="margin-left:100px;">
      &nbsp;&nbsp;<input type="submit" name="submit" value="保存" class="inp"/>
      </p>    <p>&nbsp;</p></td>
  </tr>
</table>
</form>

</div>
</body>
</html>